<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Insert title here</title>
		<script type="text/javascript">
			Ext.onReady(function (){
				var cm = new Ext.grid.ColumnModel([
					{header:'产品编号',dataIndex:'product_id'},
					{header:'产品名称',dataIndex:'product_name'},
					{header:'产品价格',dataIndex:'product_price'}
				]);
				
				var data = [
					['01','电脑','4800'],
					['02','手机','2100'],
					['03','相机','1800'],
					['04','衣服','220']
				];
				
				var store = new Ext.data.Store({
					proxy:new Ext.data.MemoryProxy(data),
					reader:new Ext.data.ArrayReader({},[
						{name:'product_id'},
						{name:'product_name'},
						{name:'product_price'}
					])
				});
				
				var store = new Ext.data.Store({
					proxy:new Ext.data.MemoryProxy(data),
					reader:new Ext.data.ArratReader({},[
						{name:'product_id',mapping:0},
						{name:'product_name',mapping:1},
						{name:'product_price',mapping:2}
					])
				});
				
				store.load();
				
				var gridPanel = new Ext.grid.GridPanel({
					autoHeight:false,
					renderTo:'grid',
					store:store,
					cm:cm
				});
			});
		</script>
	</head>
	<body>
		<div id="myUsers"></div>
	</body>
</html>